Optimal. Leaf size=90 \[ \frac {(a-b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b^2 d}-\frac {(2 a-3 b) \tanh ^{-1}(\sin (c+d x))}{2 b^2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3676, 414, 522, 206, 208} \[ \frac {(a-b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b^2 d}-\frac {(2 a-3 b) \tanh ^{-1}(\sin (c+d x))}{2 b^2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 208
Rule 414
Rule 522
Rule 3676
Rubi steps
\begin {align*} \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2 \left (a-(a-b) x^2\right )} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\sec (c+d x) \tan (c+d x)}{2 b d}+\frac {\operatorname {Subst}\left (\int \frac {-a+2 b+(-a+b) x^2}{\left (1-x^2\right ) \left (a+(-a+b) x^2\right )} \, dx,x,\sin (c+d x)\right )}{2 b d}\\ &=\frac {\sec (c+d x) \tan (c+d x)}{2 b d}-\frac {(2 a-3 b) \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{2 b^2 d}+\frac {(a-b)^2 \operatorname {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\sin (c+d x)\right )}{b^2 d}\\ &=-\frac {(2 a-3 b) \tanh ^{-1}(\sin (c+d x))}{2 b^2 d}+\frac {(a-b)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b^2 d}+\frac {\sec (c+d x) \tan (c+d x)}{2 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.38, size = 207, normalized size = 2.30 \[ \frac {-\frac {2 (a-b)^{3/2} \log \left (\sqrt {a}-\sqrt {a-b} \sin (c+d x)\right )}{\sqrt {a}}+\frac {2 (a-b)^{3/2} \log \left (\sqrt {a-b} \sin (c+d x)+\sqrt {a}\right )}{\sqrt {a}}+2 (2 a-3 b) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 (3 b-2 a) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+\frac {b}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {b}{\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^2}}{4 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.50, size = 292, normalized size = 3.24 \[ \left [-\frac {2 \, {\left (a - b\right )} \sqrt {\frac {a - b}{a}} \cos \left (d x + c\right )^{2} \log \left (-\frac {{\left (a - b\right )} \cos \left (d x + c\right )^{2} + 2 \, a \sqrt {\frac {a - b}{a}} \sin \left (d x + c\right ) - 2 \, a + b}{{\left (a - b\right )} \cos \left (d x + c\right )^{2} + b}\right ) + {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, b \sin \left (d x + c\right )}{4 \, b^{2} d \cos \left (d x + c\right )^{2}}, -\frac {4 \, {\left (a - b\right )} \sqrt {-\frac {a - b}{a}} \arctan \left (\sqrt {-\frac {a - b}{a}} \sin \left (d x + c\right )\right ) \cos \left (d x + c\right )^{2} + {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, b \sin \left (d x + c\right )}{4 \, b^{2} d \cos \left (d x + c\right )^{2}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 2.96, size = 131, normalized size = 1.46 \[ -\frac {\frac {{\left (2 \, a - 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{b^{2}} - \frac {{\left (2 \, a - 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{b^{2}} - \frac {4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \arctan \left (-\frac {a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )}{\sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} b^{2}} + \frac {2 \, \sin \left (d x + c\right )}{{\left (\sin \left (d x + c\right )^{2} - 1\right )} b}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.71, size = 224, normalized size = 2.49 \[ \frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right ) a^{2}}{d \,b^{2} \sqrt {a \left (a -b \right )}}-\frac {2 \arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right ) a}{d b \sqrt {a \left (a -b \right )}}+\frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{d \sqrt {a \left (a -b \right )}}-\frac {1}{4 d b \left (-1+\sin \left (d x +c \right )\right )}-\frac {3 \ln \left (-1+\sin \left (d x +c \right )\right )}{4 d b}+\frac {\ln \left (-1+\sin \left (d x +c \right )\right ) a}{2 d \,b^{2}}-\frac {1}{4 d b \left (\sin \left (d x +c \right )+1\right )}+\frac {3 \ln \left (\sin \left (d x +c \right )+1\right )}{4 d b}-\frac {\ln \left (\sin \left (d x +c \right )+1\right ) a}{2 d \,b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 13.76, size = 268, normalized size = 2.98 \[ -\frac {\left (\frac {\mathrm {atanh}\left (\frac {\sin \left (c+d\,x\right )\,\sqrt {a-b}}{\sqrt {a}}\right )\,{\left (a-b\right )}^{3/2}\,1{}\mathrm {i}}{2}-a^{3/2}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-a^{3/2}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\cos \left (2\,c+2\,d\,x\right )+\frac {\cos \left (2\,c+2\,d\,x\right )\,\mathrm {atanh}\left (\frac {\sin \left (c+d\,x\right )\,\sqrt {a-b}}{\sqrt {a}}\right )\,{\left (a-b\right )}^{3/2}\,1{}\mathrm {i}}{2}\right )\,1{}\mathrm {i}}{\sqrt {a}\,b^2\,d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )}-\frac {\left (\frac {\sqrt {a}\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}}{2}+\frac {3\,\sqrt {a}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+\frac {3\,\sqrt {a}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\cos \left (2\,c+2\,d\,x\right )}{2}\right )\,1{}\mathrm {i}}{\sqrt {a}\,b\,d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{5}{\left (c + d x \right )}}{a + b \tan ^{2}{\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________